using System;
using System.Threading;
class App {
   static void ThreadMethod() {
      Thread.Sleep(10000);
      Console.WriteLine("ThreadMethod is exiting");
   }
   public static void Main() {
      // Create a new Foreground thread
      Thread t = new Thread(new ThreadStart(ThreadMethod));

#if BACKGROUND_THREAD_TEST
      // Make the thread a background thread
      t.IsBackground = true;
#endif

      t.Start(); // Start the thread
      return;   // NOTE: the application won't actually die for about 10 seconds
   }
}
